{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "576b0a2d-8b8c-4496-b8fe-a5644c550933",
   "metadata": {},
   "source": [
    "# Creating custom cistarget database\n",
    "\n",
    "In this tutorial we will create a custom cistarget database using consensus peaks.\n",
    "\n",
    "This involves precomputed scores for all the motifs in our motif collection on a predefined set of regions\n",
    "\n",
    "We provide precomputed databases for [human](https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg38/screen/mc_v10_clust/region_based/), [mouse](https://resources.aertslab.org/cistarget/databases/mus_musculus/mm10/screen/mc_v10_clust/region_based/) and [fly](https://resources.aertslab.org/cistarget/databases/drosophila_melanogaster/dm6/flybase_r6.02/mc_v10_clust/region_based/). These databases are computed on regulatory regions spanning the genome. Feel free to use these databases, however for the best results we recommend to generate a custom database given that it is highly likely that the precomputed databases don't cover all the regions in your consensus peak set."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1190f5d6-05fd-430d-8d73-97cabb988976",
   "metadata": {
    "tags": []
   },
   "source": [
    "## Download create_cistarget_database\n",
    "\n",
    "We will start by downloading and installing the `create_cistarget_database` repository."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "4e16eb61-a2d8-4179-8959-fda40c86a630",
   "metadata": {},
   "outputs": [],
   "source": [
    "cd /staging/leuven/stg_00002/lcb/sdewin/PhD/python_modules/scenicplus_development_tutorial/ctx_db\n",
    "source /staging/leuven/stg_00002/mambaforge/vsc33053/etc/profile.d/conda.sh\n",
    "conda activate scenicplus_development_tutorial"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "62c7a392-f06a-4c7a-9b11-7457f5229c63",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Cloning into 'create_cisTarget_databases'...\n",
      "remote: Enumerating objects: 552, done.\u001b[K\n",
      "remote: Counting objects: 100% (552/552), done.\u001b[K\n",
      "remote: Compressing objects: 100% (268/268), done.\u001b[K\n",
      "remote: Total 552 (delta 332), reused 467 (delta 247), pack-reused 0\u001b[K\n",
      "Receiving objects: 100% (552/552), 179.97 KiB | 4.00 MiB/s, done.\n",
      "Resolving deltas: 100% (332/332), done.\n",
      "create_cistarget_databases_dir='/lustre1/project/stg_00002/lcb/sdewin/PhD/python_modules/scenicplus_development_tutorial/ctx_db'\n"
     ]
    }
   ],
   "source": [
    "git clone https://github.com/aertslab/create_cisTarget_databases"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f6b5044b-f4eb-4a69-b645-058c2c308174",
   "metadata": {},
   "source": [
    "## Download cluster-buster\n",
    "\n",
    "[Cluster-buster](https://github.com/weng-lab/cluster-buster) will be used to score the regions using our motif collection. We provide a precompiled binary of cluster buster.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "9ee58007-64d0-43e5-b86d-c2e4eb19bc18",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "--2024-03-06 14:39:06--  https://resources.aertslab.org/cistarget/programs/cbust\n",
      "Resolving resources.aertslab.org (resources.aertslab.org)... 134.58.50.9\n",
      "Connecting to resources.aertslab.org (resources.aertslab.org)|134.58.50.9|:443... connected.\n",
      "HTTP request sent, awaiting response... 200 OK\n",
      "Length: 3209632 (3.1M)\n",
      "Saving to: ‘cbust’\n",
      "\n",
      "cbust               100%[===================>]   3.06M  14.1MB/s    in 0.2s    \n",
      "\n",
      "2024-03-06 14:39:07 (14.1 MB/s) - ‘cbust’ saved [3209632/3209632]\n",
      "\n"
     ]
    }
   ],
   "source": [
    "wget https://resources.aertslab.org/cistarget/programs/cbust\n",
    "chmod a+x cbust"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0cc7b186-7aac-4993-9218-d01840ea642b",
   "metadata": {},
   "source": [
    "## Download motif collection\n",
    "\n",
    "Next, we will download the motif collection."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "9b742119-875d-4a36-887e-82f02843d1e1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "--2024-03-06 14:42:21--  https://resources.aertslab.org/cistarget/motif_collections/v10nr_clust_public/v10nr_clust_public.zip\n",
      "Resolving resources.aertslab.org (resources.aertslab.org)... 134.58.50.9\n",
      "Connecting to resources.aertslab.org (resources.aertslab.org)|134.58.50.9|:443... connected.\n",
      "HTTP request sent, awaiting response... 200 OK\n",
      "Length: 89706219 (86M) [application/zip]\n",
      "Saving to: ‘aertslab_motif_colleciton/v10nr_clust_public.zip’\n",
      "\n",
      "aertslab_motif_coll 100%[===================>]  85.55M   109MB/s    in 0.8s    \n",
      "\n",
      "2024-03-06 14:42:22 (109 MB/s) - ‘aertslab_motif_colleciton/v10nr_clust_public.zip’ saved [89706219/89706219]\n",
      "\n"
     ]
    }
   ],
   "source": [
    "mkdir -p aertslab_motif_colleciton\n",
    "wget -O aertslab_motif_colleciton/v10nr_clust_public.zip https://resources.aertslab.org/cistarget/motif_collections/v10nr_clust_public/v10nr_clust_public.zip"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "1de9beeb-b77c-4a0a-9e39-ce35c3930405",
   "metadata": {},
   "outputs": [],
   "source": [
    "cd aertslab_motif_colleciton; unzip -q v10nr_clust_public.zip\n",
    "cd .."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "624855cf-7ed5-45f9-bf3c-1ccfc2a922c6",
   "metadata": {},
   "source": [
    "These are the motif-to-TF annotations for:\n",
    "\n",
    "- Chicken: motifs-v10-nr.chicken-m0.00001-o0.0.tbl\n",
    "- fly: motifs-v10-nr.flybase-m0.00001-o0.0.tbl\n",
    "- human: motifs-v10-nr.hgnc-m0.00001-o0.0.tbl\n",
    "- mouse: motifs-v10-nr.mgi-m0.00001-o0.0.tbl"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "bdb868c6-fb5f-4f20-874f-76488cbc941a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "motifs-v10-nr.chicken-m0.00001-o0.0.tbl  motifs-v10-nr.hgnc-m0.00001-o0.0.tbl\n",
      "motifs-v10-nr.flybase-m0.00001-o0.0.tbl  motifs-v10-nr.mgi-m0.00001-o0.0.tbl\n"
     ]
    }
   ],
   "source": [
    "ls aertslab_motif_colleciton/v10nr_clust_public/snapshots/"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "80ee106a-a829-4e78-a482-572e7634dfe7",
   "metadata": {},
   "source": [
    "Here are some example motifs, they are stored in cb format."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "7a06bf5d-5fa9-4bd0-9cbb-e9d5b9c82ed9",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "total 42412\n",
      "-rw-rw-r--+ 1 vsc33053 vsc33053   163 Jan 27  2022 bergman__Adf1.cb\n",
      "-rw-rw-r--+ 1 vsc33053 vsc33053    75 Jan 27  2022 bergman__Aef1.cb\n",
      "-rw-rw-r--+ 1 vsc33053 vsc33053    75 Jan 27  2022 bergman__Hr46.cb\n",
      "-rw-rw-r--+ 1 vsc33053 vsc33053   113 Jan 27  2022 bergman__Kr.cb\n",
      "-rw-rw-r--+ 1 vsc33053 vsc33053    86 Jan 27  2022 bergman__Su_H_.cb\n",
      "-rw-rw-r--+ 1 vsc33053 vsc33053    83 Jan 27  2022 bergman__TFAM.cb\n",
      "-rw-rw-r--+ 1 vsc33053 vsc33053    77 Jan 27  2022 bergman__ap.cb\n",
      "-rw-rw-r--+ 1 vsc33053 vsc33053   398 Jan 27  2022 bergman__bcd.cb\n",
      "-rw-rw-r--+ 1 vsc33053 vsc33053    84 Jan 27  2022 bergman__bin.cb\n"
     ]
    }
   ],
   "source": [
    "ls -l aertslab_motif_colleciton/v10nr_clust_public/singletons | head"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "23db27b0-ef8c-4b27-87d8-b3ce946a62fd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      ">bergman__Adf1\n",
      "0\t0\t100\t0\n",
      "0\t100\t0\t0\n",
      "0\t0\t0\t100\n",
      "0\t50\t50\t0\n",
      "0\t100\t0\t0\n",
      "0\t50\t0\t50\n",
      "0\t0\t50\t50\n",
      "0\t100\t0\t0\n",
      "0\t50\t0\t50\n",
      "0\t0\t100\t0\n",
      "0\t50\t0\t50\n",
      "33.33333333\t33.33333333\t0\t33.33333333\n"
     ]
    }
   ],
   "source": [
    "cat aertslab_motif_colleciton/v10nr_clust_public/singletons/bergman__Adf1.cb"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "58c57e32-a87d-4ef4-97f0-0a8be62300da",
   "metadata": {},
   "source": [
    "## Prepare fasta from consensus regions\n",
    "\n",
    "Next we will get sequences for all the consensus peaks. We will also add 1kb of background padding, this will be used as a background sequence for cluster-buster. It is completely optional to add this padding, we have noticed that it does not affect the analyses a lot."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "9863ad71-3300-4f55-bc55-7c55ab1eabbe",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Lmod is automatically replacing \"cluster/genius/dedicated_big_bigmem\" with\n",
      "\"cluster/wice/bigmem\".\n",
      "\n",
      "\n",
      "Inactive Modules:\n",
      "  1) GCCcore/6.4.0                    3) ncurses/6.0-GCCcore-6.4.0\n",
      "  2) libevent/2.1.8-GCCcore-6.4.0     4) tmux\n",
      "\n",
      "\n",
      "Activating Modules:\n",
      "  1) GCCcore/10.3.0\n",
      "\n"
     ]
    }
   ],
   "source": [
    "module load cluster/wice/bigmem\n",
    "module load BEDTools/2.30.0-GCC-10.3.0\n",
    "\n",
    "REGION_BED=\"/staging/leuven/stg_00002/lcb/sdewin/PhD/python_modules/pycisTopic_polars_tutorial/outs/consensus_peak_calling/consensus_regions.bed\"\n",
    "GENOME_FASTA=\"/staging/leuven/res_00001/genomes/homo_sapiens/hg38_ucsc/fasta/hg38.fa\"\n",
    "CHROMSIZES=\"/staging/leuven/res_00001/genomes/homo_sapiens/hg38_ucsc/fasta/hg38.chrom.sizes\"\n",
    "DATABASE_PREFIX=\"10x_brain_1kb_bg_with_mask\"\n",
    "SCRIPT_DIR=\"/staging/leuven/stg_00002/lcb/sdewin/PhD/python_modules/scenicplus_development_tutorial/ctx_db/create_cisTarget_databases\"\n",
    "\n",
    "${SCRIPT_DIR}/create_fasta_with_padded_bg_from_bed.sh \\\n",
    "        ${GENOME_FASTA} \\\n",
    "        ${CHROMSIZES} \\\n",
    "        ${REGION_BED} \\\n",
    "        hg38.10x_brain.with_1kb_bg_padding.fa \\\n",
    "        1000 \\\n",
    "        yes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "ae821bd1-7785-4ffd-b9f2-9d0051f22adf",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      ">chr1:818570-819070\n",
      "TGATTGTAAAGCACGGAATGACTCTTAGAAACTGGGCGTCATTCTTTGTGGTTTTCCAAGCTTGGTCTCTGATGATACTCCAGGTCTTAGGAGACATGCTGAATATTTATTATGCTTACATTCAAGCAACATTAACCCTTAAGGTTGATGTAGCTCCCCGTCTTTTTTTCCCAGAAGGAGGAGCACTGAAGGAACACTTTTCCAGTATGGATTCTTTCCAGCTCCGAGAAGCTGGAGGCACACGGATCCCTCGGCCAGCTCTCATCTATGGACGTGCTGTAGTCACAAGGACTGTGACTAAGGCTCAGTCCCTGAGGACTGCCTTGGCATGGGCTGCTTTAGGCTGTAAACACCCAGTTTTATCCACTTTATGTGAAGAAAGCCAACAAGGGGCATGGAGTGAGTTCCGCAGGTTTTAGCGGCTGCGGCGGCTGGTGCTCAGTGGGGATGATGGCGGGAAGGCGCCTCCctctgtgggccccgaggtctgtgcgggaatcagctctgcagctgtgtccaggggcagccgtagaccacacacggcaggctcacagctctgttccatgagaactttatacacaaaagcagacgggctgggcttggcctctggatcataatctgctgacccctgGGTAAGAAATTTTAAATATTTACTTATTTCTGTTCAACAGAAGGGGTGATATACTGAGGAGTGAATAATGGGAAAGATCTGATTCGGCTGTATCAGGAAGGACTGGTGTAAATTCAACTTATTAACTGAATTCACAGTATTCGTGTTTTATGCCTTTAGGGGTTAAAAATGGGTCACACACGAGCAGCATGCACTTCACTGGCGTGGCAGGGCACCTCAGTGTTTACATGTGTGGTTCCCATGCTTACCAGGGCTGGAGGCCCCTGTGAGTAGTGAAGTGCATGTGGAGTTCTGGATACTTTTCCTGGCTTTCTCTATTTGTGTGAGCTTGTGCAGTTAGAGGTTTGGGCTGAATTTGGGTAGAAATGGGTGGCTCACAGGCTGCAAAAGTTCTGTGGACACTTTTTCCCCCAGCTGATTaatgttgtaaatattagaatattgttacataaaagtctggatttttagtttctttcacattggaatagctgccaacattgggcctgcattcatctctctagggcaacgtcggctgcagctgagatggctgctccccggtggggtgtgtgctcggcctgcagtccccgccctccGGACTCCATTCGCCTCCACTCTCAGGTTTGCACCTCGTCATTGTCTTCTAATTTTGCATCCCTGGACTGCGTGACCTACAAGGCTCTCAGCACAACAAGACTCTATGATTCTGTCTATTGGAACAAAAAGCCAGTGAGGCAAGTGTATCATCCTGTTGATGAATTCACAGCATTAACTCTGGGAGTTGGGGACAGTGTGTATTCTTCCTCCAGACACTCTCTGTTTCTCCTGGATGGAAAGGTTCTGCTACTTGTCCCGTGGTCAGGCCCAgccaatggaacggaatggaagtgactctgccccttattggcagaaactttaaaagccgcacaacgttcctgcaccctcccctctgccatgagcctggcagtgctcaggatgggaaaattatctcacctgggcctgaggatacaggagctacccccagcctgcagtggaagagaagcatggacaagtgattaaactttgtgttttcaagccacagaggttttttgaagttgtttgctacCATGCTTTGTCCCTACAAACACAGTCATGGAGAAGGCCAGTGGCAGAGCCTGAGCCGTTCGCGCATCTGTTCACCAGTATCCAGAATAACAATAGATTTTTGAAACATTCCTGAGAAAATTCTGGGAGTTGCATACCGGCCAGTCTTATTCTCTAAAGTTGTTCCTTCTAAAGGGTGTGATGACCGAAAATTTCAGAAAAGCAAACCACCGCTGAAAGGCAACGTTATTTCTGTTGGCAGAAGGCGGCCTGAGCAATCTAGATTTTCCACGGTTCACCAACTAGTTTTTAAGGAAATATGGCTGTGagaggaataaaacatgattcctacctttaaggaactcagagAAGTGAATTAAAGGAAGTCACAGATCAGACAACCAACCACACAAAGTTTCTAAGAGCAAACTGTTCAGGTCGGCAAGTCActcttatccactgttttgccttctaaggtttcagttactctcagtcagtcatggtccaaaaacattaaatgaaaaattccagaaataaacaatacacacgtgttaaatcatgtttcattctgagtagcttgatgaagtctcatgccgtcccactcagccccacctggggtgtgacacctccctctgtcgagcagatccaccctgtctatactacctgcTTTTCCAGGAGATCCACCCTGTCTAGACTACCTGCGTGGCCAGCAGATCCACCCTATCTACACTACCTGCTTTTCCAGCAGATCCACCCTGTCTACACTACCTGCCTGTCCAGCAGATCAAC\n"
     ]
    }
   ],
   "source": [
    "head -n 2 hg38.10x_brain.with_1kb_bg_padding.fa"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d2eafc9c-e802-48b9-a5d2-524b7d6e583f",
   "metadata": {},
   "source": [
    "## Create cistarget databases\n",
    "\n",
    "Now we can create the ranking and score database. This step will take some time so we recommend to run it as a job (i.e. not in jupyter notebooks)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "83c7db12-96f8-4b88-8793-9ce5e4709680",
   "metadata": {},
   "outputs": [],
   "source": [
    "ls aertslab_motif_colleciton/v10nr_clust_public/singletons > motifs.txt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "80a561aa-ce1c-456f-9a05-0d9c0fc04d1f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Initialize dataframe (436234 regions x 10249 motifs) for storing CRM scores for each regions per motif.\n",
      "Adding Cluster-Buster CRM scores (1 of 10249) for motif \"metacluster_146.2\" took 0.204300 seconds.\n",
      "Adding Cluster-Buster CRM scores (2 of 10249) for motif \"metacluster_116.3\" took 0.161770 seconds.\n",
      "Adding Cluster-Buster CRM scores (3 of 10249) for motif \"metacluster_157.2\" took 0.115518 seconds.\n",
      "Adding Cluster-Buster CRM scores (4 of 10249) for motif \"metacluster_120.1\" took 0.216778 seconds.\n",
      "Adding Cluster-Buster CRM scores (5 of 10249) for motif \"metacluster_112.2\" took 0.139475 seconds.\n",
      "Adding Cluster-Buster CRM scores (6 of 10249) for motif \"metacluster_166.4\" took 0.115991 seconds.\n",
      "Adding Cluster-Buster CRM scores (7 of 10249) for motif \"metacluster_177.3\" took 0.146787 seconds.\n",
      "Adding Cluster-Buster CRM scores (8 of 10249) for motif \"metacluster_148.1\" took 0.119116 seconds.\n",
      "Adding Cluster-Buster CRM scores (9 of 10249) for motif \"metacluster_46.4\" took 0.197134 seconds.\n",
      "Adding Cluster-Buster CRM scores (10 of 10249) for motif \"metacluster_13.3\" took 0.118657 seconds.\n",
      "Adding Cluster-Buster CRM scores (11 of 10249) for motif \"metacluster_111.4\" took 0.107039 seconds.\n",
      "Adding Cluster-Buster CRM scores (12 of 10249) for motif \"metacluster_121.1\" took 0.099567 seconds.\n",
      "Adding Cluster-Buster CRM scores (13 of 10249) for motif \"metacluster_164.1\" took 0.121122 seconds.\n",
      "Adding Cluster-Buster CRM scores (14 of 10249) for motif \"metacluster_151.1\" took 0.112270 seconds.\n",
      "Adding Cluster-Buster CRM scores (15 of 10249) for motif \"metacluster_124.2\" took 0.112771 seconds.\n",
      "Adding Cluster-Buster CRM scores (16 of 10249) for motif \"metacluster_1.9\" took 0.114057 seconds.\n",
      "Adding Cluster-Buster CRM scores (17 of 10249) for motif \"metacluster_118.1\" took 0.163274 seconds.\n",
      "Adding Cluster-Buster CRM scores (18 of 10249) for motif \"metacluster_57.3\" took 0.262836 seconds.\n",
      "Adding Cluster-Buster CRM scores (19 of 10249) for motif \"metacluster_150.6\" took 0.119764 seconds.\n",
      "Adding Cluster-Buster CRM scores (20 of 10249) for motif \"metacluster_0.2\" took 0.115105 seconds.\n",
      "Adding Cluster-Buster CRM scores (21 of 10249) for motif \"metacluster_149.1\" took 0.114256 seconds.\n",
      "Adding Cluster-Buster CRM scores (22 of 10249) for motif \"metacluster_173.2\" took 0.110355 seconds.\n",
      "Adding Cluster-Buster CRM scores (23 of 10249) for motif \"metacluster_137.2\" took 0.104703 seconds.\n",
      "Adding Cluster-Buster CRM scores (24 of 10249) for motif \"metacluster_115.1\" took 0.121014 seconds.\n",
      "Adding Cluster-Buster CRM scores (25 of 10249) for motif \"metacluster_125.2\" took 0.106094 seconds.\n",
      "Adding Cluster-Buster CRM scores (26 of 10249) for motif \"metacluster_169.2\" took 0.127284 seconds.\n",
      "Adding Cluster-Buster CRM scores (27 of 10249) for motif \"metacluster_101.6\" took 0.100963 seconds.\n",
      "Adding Cluster-Buster CRM scores (28 of 10249) for motif \"metacluster_128.2\" took 0.119298 seconds.\n",
      "Adding Cluster-Buster CRM scores (29 of 10249) for motif \"metacluster_163.1\" took 0.180142 seconds.\n",
      "Adding Cluster-Buster CRM scores (30 of 10249) for motif \"metacluster_123.5\" took 0.098548 seconds.\n",
      "Adding Cluster-Buster CRM scores (31 of 10249) for motif \"metacluster_156.3\" took 0.211007 seconds.\n",
      "Adding Cluster-Buster CRM scores (32 of 10249) for motif \"metacluster_133.2\" took 0.103186 seconds.\n",
      "Adding Cluster-Buster CRM scores (33 of 10249) for motif \"metacluster_176.1\" took 0.120749 seconds.\n",
      "Adding Cluster-Buster CRM scores (34 of 10249) for motif \"metacluster_136.3\" took 0.172081 seconds.\n",
      "Adding Cluster-Buster CRM scores (35 of 10249) for motif \"metacluster_152.3\" took 0.124086 seconds.\n"
     ]
    }
   ],
   "source": [
    "OUT_DIR=\"\"${PWD}\"\"\n",
    "CBDIR=\"${OUT_DIR}/aertslab_motif_colleciton/v10nr_clust_public/singletons\"\n",
    "FASTA_FILE=\"${OUT_DIR}/hg38.10x_brain.with_1kb_bg_padding.fa\"\n",
    "MOTIF_LIST=\"${OUT_DIR}/motifs.txt\"\n",
    "\n",
    "\"${SCRIPT_DIR}/create_cistarget_motif_databases.py\" \\\n",
    "    -f ${FASTA_FILE} \\\n",
    "    -M ${CBDIR} \\\n",
    "    -m ${MOTIF_LIST} \\\n",
    "    -o ${OUT_DIR}/${DATABASE_PREFIX} \\\n",
    "    --bgpadding 1000 \\\n",
    "    -t 20"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Bash (ipykernel)",
   "language": "bash",
   "name": "bash"
  },
  "language_info": {
   "codemirror_mode": "shell",
   "file_extension": ".sh",
   "mimetype": "text/x-sh",
   "name": "bash"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
